import instance from "../../utils/request";



class Ax{
    constructor(contentType="application/json") {
        this.contentType = {
            "Content-Type": contentType,
        }
    }


    detailData(product_id){
        return instance({
            method:"get",
            url:"/porduct/products/" + product_id,
            header: this.contentType
        })
    }

    makeDetail(token){
        return instance({
            method: "post",
            url: "/basket/baskets",
            headers: {"Authorization" : "Bearer " + token}
        })
    }

    addProductDetail(id, data={}, token){
        return instance({
            method:"put",
            url:"/basket/baskets/" + id,
            headers: {"Authorization" : "Bearer " + token},
            data:data

        })
    }

}


export default Ax